using SmartTracking.Domain.HQX;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace BaseData.Domain
{
    /// <summary>
    /// 种母历史记录表
    /// </summary>
    [Table("EweHistoryRecord")]
    public class EweHistoryRecord : BaseEntity
    {
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [Key]
        /// <summary>
        /// 历史记录ID
        /// </summary>
        public int HistoryId { get; set; }

        /// <summary>
        /// 种母耳号（下拉框获取，对应EweFile的EweId）
        /// </summary>
        [Required]
        public int EweId { get; set; }

        /// <summary>
        /// 配种日期
        /// </summary>
        [Required]
        public DateTime MatingDate { get; set; }

        /// <summary>
        /// 种公耳号（下拉框获取，对应RamFile的RamId）
        /// </summary>
        public int RamId { get; set; }

        /// <summary>
        /// 妊检日期
        /// </summary>
        public DateTime? PregnancyCheckDate { get; set; }

        /// <summary>
        /// 妊检结果
        /// </summary>
        public string PregnancyResult { get; set; } = string.Empty;

        /// <summary>
        /// 分娩日期
        /// </summary>
        public DateTime? DeliveryDate { get; set; }

        /// <summary>
        /// 健羔数
        /// </summary>
        public int HealthyLambCount { get; set; }

        /// <summary>
        /// 健羔总重
        /// </summary>
        public decimal HealthyLambTotalWeight { get; set; }

        /// <summary>
        /// 弱羔数
        /// </summary>
        public int WeakLambCount { get; set; }

        /// <summary>
        /// 畸形数
        /// </summary>
        public int DeformedCount { get; set; }

        /// <summary>
        /// 死胎数
        /// </summary>
        public int StillbirthCount { get; set; }

        /// <summary>
        /// 木乃伊数
        /// </summary>
        public int MummyCount { get; set; }

        /// <summary>
        /// 畸胎数
        /// </summary>
        public int AbnormalCount { get; set; }

        /// <summary>
        /// 当前胎次
        /// </summary>
        [Required]
        public int CurrentParity { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Note { get; set; } = string.Empty;
    }
}